package com.zoffy.oj_backend.model.vo;


import com.zoffy.oj_backend.model.entity.QuestionSubmit;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.Date;

@Data
public class QuestionSubmitVo {
    /**
     * id
     */
    private Long id;

    /**
     * 编程语言
     */
    private String lang;

    /**
     * 用户代码
     */
    private String code;

    /**
     * 判题信息
     */
    private String judgeInfo;

    /**
     * 判题状态(0-待判，1-判题中，2-成功，3-失败)
     */
    private Integer state;

    /**
     * 题目id
     */
    private Long questionId;

    /**
     * 用户id
     */
    private Long userId;
    public static QuestionSubmitVo obj2Vo(QuestionSubmit questionSubmit){


        QuestionSubmitVo questionSubmitVo = new QuestionSubmitVo();
        BeanUtils.copyProperties(questionSubmit,questionSubmitVo);
        return questionSubmitVo;

    }
}
